const express = require("express");
const jsonServer = require("json-server");

const app = express();
const router = jsonServer.router("db.json");
const middlewares = jsonServer.defaults();

app.use(middlewares);
app.use("/", router);

app.listen(3000, "0.0.0.0", () => {
  console.log("JSON Server is running on port 3000");
});
